package cn.yesway.proxy.static1;

/**
 * 真实主题角色：定义真实的对象。
 * 
 * @author chencq
 * 
 */
public class PeopleTalk implements ITalk {

	public String username;
	public String age;

	public  PeopleTalk(){
	}
	
	public PeopleTalk(String username, String age) {
		this.username = username;
		this.age = age;
	}

	public void talk(String msg) {
		if(null!=username&&null!=age){
			System.out.println(msg+",my name is "+username +",age is "+age);
		}else{
			System.out.println(msg);
		}
		
	}

	public String getName() {
		return username;
	}

	public void setName(String name) {
		this.username = name;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

}